package com.hzhc.controller.wxapp;

import com.hzhc.common.BaseController;
import com.hzhc.service.CntrInfoService;
import com.hzhc.service.CntrLogService;
import com.hzhc.vo.DataAnalyVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequiredArgsConstructor
@RequestMapping("/app")
public class WxApiDataAnalysisController extends BaseController {

    private final CntrLogService cntrLogService;
    private final CntrInfoService cntrInfoService;


    /**
     * 数据分析曲线图列表
     */
    @RequestMapping("/dataAnaly")
    public Map<String, Object> dataAnaly() {
        Map<String, Object> map = cntrLogService.dataAnaly();
        return map;
    }

    /**
     * 数据分析头部 表格
     */
    @RequestMapping("/dataTeuAnaly")
    public Map<String, Object> dataTeuAnaly(@RequestBody DataAnalyVo vo) {
        Map<String, Object> map = cntrLogService.dataTeuAnaly(vo);
        return map;
    }

    /**
     * 数据分析头部 表格
     */
    @RequestMapping("/dataCntrAnaly")
    public Map<String, Object> dataCntrAnaly() {
        Map<String, Object> map = cntrInfoService.dataCntrAnaly();
        return map;
    }
}
